/**
 * @Title: SellerCategoryController.java
 * @Description: 注解类
 * <p>
 * Copyright(C) 2018-2019    NPlus
 * Company:   无锡核心信息科技有限公司
 * @version V1.0
 * @Date: 13:30 2018/10/15
 * <p>
 * 修改历史:
 * Date                 Author        Version        Discription
 * -----------------------------------------------------------------------------------
 * 13:30 2018/10/15       zhangshuwei        1.0            初始化版本
 */
package com.imooc.controller;

import com.imooc.dataobject.ProductCategory;
import com.imooc.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/seller/category")
@Api(value = "/seller/category", tags = "测试接口模块")
public class SellerCategoryController {

    @Autowired
    CategoryService categoryService;

    /**
     * 类目列表
     * @param
     * @return
     */
    @ApiOperation(value = "类目列表", notes = "")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
    public List<ProductCategory> getProductCategoryList() {
        List<ProductCategory> categoryList = categoryService.findAll();
        return categoryList;
    }

}
